#import "drawingListener.h"
#import "drawingEvent.h"

@implementation DrawingListener

-(id) initWithSubType:(int)sub
{
	if (![super init])
		return nil;
	
	drawing_event_subtype = sub;
	
	return self;
}

-(BOOL) checkEvent:(Event*)evt
{
	BOOL resultado = NO;
	DrawingEvent* devt = [[DrawingEvent alloc] initWithEvent:evt];
	
	if ([evt type] == DRAWING_EVENT_TYPE)
	{
		if ([devt subType] == drawing_event_subtype)
		{
			resultado = YES;
		}
	}
	
	[devt release];
		
	return resultado;
}

-(void) action:(id)receiver event:(Event*)evt
{
	//NO SE IMPLEMENTA
}

-(NSString*) name
{
	return @"DrawingListener";
}

@end
